package com.SwaggerTest.BaseTest;


import com.SwaggerTest.bean.Parent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testng.annotations.Test;

/**
 * Spring Testng 框架 并使用Ioc注入功能
 */
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class SpringBootIocWithTestNG extends AbstractTestNGSpringContextTests {
    @Autowired
    Parent parent;

    @Test
    public void TestSpringBootIOCWhitTestNG() {
        System.out.println(parent);
    }

}
